import requests
from bs4 import BeautifulSoup
url = 'http://books.toscrape.com/'
res = requests.get(url).text
soup = BeautifulSoup(res , 'html.parser')
all_titles = soup.find_all('h3')

for title in all_titles:
    # all_links = title.find_all('a')
    # for link in all_links:
    #     print(link.string)
    link = title.find("a")
    print(link.text)
